<!--[*
// ----------------------------------------------------------------------
// Source file:  $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_user_orderdata.html,v $
//
// Last changes from:  $Author: landseer $
//
// Revision:           $Revision: 1.9 $
//
// Date of revision    $Date: 2005/03/21 16:16:51 $
//
// ----------------------------------------------------------------------
//
// called from pncommerce_user_orderdata
// task: show the users orders - open and fulfilled 
// 
*]-->

<!--[*include file='pncommerce_user_commonHeader.html' *]-->
<!-- start orderdata -->

<p><!--[ pnml name='_PNC_YOURORDERDATA' ]--></p>
<!--[ pncGetOrdersByUser user=$user ]-->
<!--[pncGetStatisticsForOrders Orders=$Orders]-->
<!--[*debug*]-->
<br>
<!--[ if $Orders==false ]-->
<p align='center'><!--[ pnml name='_PNC_NOORDERSFOUND' ]--></p>
<!--[ else ]-->
<table width='100%'>
    <tr width='100%'>
        <th>
            <!--[ pnml name='_PNC_ORDERNUMBER' ]-->
        </th>
        <th>
            <!--[ pnml name='_PNC_DATE' ]-->
        </th>
        <th>
            <!--[ pnml name='_PNC_INVOICELINK' ]-->
        </th>
        <th>
            <!--[ pnml name='_PNC_STATUS' ]-->
        </th>
    </tr>

<!--[ foreach item=Order from=$Orders ]-->
    <tr width='100%'>
        <td align='center'>
            <!--[ $Order.OrderNumber ]-->
        </td>
        <td align='center'>
            <!--[ $Order.Date|pncDateTimeString ]-->
        </td>
        <td align='center'>
            <a href="<!--[ pncUserModURL func=receipt ON=$Order.OrderNumber KID=$Order.UserID ]-->"><!--[ pnml name='_PNC_CLICKHERE' ]--></a>
        </td>
        <td align='center'>
            <!--[ $Order.OrderStatus|pncShowOrderStatusText ]-->
        </td>
    </tr>
<!--[ /foreach ]-->
<!--[*We could add some more statistics here, but I don't want to do it now. It's in $statistics, use the debug plugin to see its structure*]-->
<tr><td><b><!--[pnml name='_PNC_STATISTICS']--></b></td></tr>
<tr>
  <td><!--[pnml name='_PNC_BOUGHTPRODUCTS']--></td>
  <td><!--[$statistics.all.ItemCount]--></td>
</tr> 
<tr>
  <td><!--[pnml name='_PNC_BOUGHTNUMBEROFPRODUCTS']--></td>
  <td><!--[$statistics.all.QuantityCount]--></td>
</tr>
<tr>
  <td><!--[pnml name='_PNC_TOTALPRICE']--></td>
  <td><!--[$statistics.all.Total|pncShowAsPrice showcurrency=true]--></td>
</tr>
</table>
<!--[ /if ]-->

<!-- end orderdata -->
<!--[*include file='pncommerce_user_commonFooter.html' *]-->
